<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php echo hook('syncMeta');?>
<?php $oneplus_seo_meta = get_seo_meta($vars,$seo); ?>
<?php if($oneplus_seo_meta['title']): ?><title><?php echo ($oneplus_seo_meta['title']); ?>-<?php echo modC('WEB_SITE_NAME',L('_OPEN_SNS_'),'Config');?></title>
<?php else: ?>
<title><?php echo modC('WEB_SITE_NAME',L('_OPEN_SNS_'),'Config');?></title><?php endif; ?>
<?php if($oneplus_seo_meta['keywords']): ?><meta name="keywords" content="<?php echo ($oneplus_seo_meta['keywords']); ?>"/><?php endif; ?>
<?php if($oneplus_seo_meta['description']): ?><meta name="description" content="<?php echo ($oneplus_seo_meta['description']); ?>"/><?php endif; ?>
<link href="/Public/zui/css/zui.css" rel="stylesheet">
<link href="/Public/zui/css/zui-theme.css" rel="stylesheet">
<link href="/Theme/Want/Public/css/iconfont.css" rel="stylesheet"/>
<link href="/Theme/Want/Public/css/core.css" rel="stylesheet"/>
<link href="/Theme/Want/Public/css/want.css" rel="stylesheet"/>
<link type="text/css" rel="stylesheet" href="/Public/js/ext/magnific/magnific-popup.css"/>
<script src="/Public/js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,js/core.js,js/com/com.toast.class.js,js/com/com.ucard.js"></script>
<!--Style-->
<!--合并前的js-->
<?php $config = api('Config/lists'); C($config); $count_code=C('COUNT_CODE'); ?>
<script type="text/javascript">
    var ThinkPHP = window.Think = {
        "ROOT": "", //当前网站地址
        "APP": "/index.php?s=", //当前项目地址
        "PUBLIC": "/Public", //项目公共目录地址
        "DEEP": "<?php echo C('URL_PATHINFO_DEPR');?>", //PATHINFO分割符
        "MODEL": ["<?php echo C('URL_MODEL');?>", "<?php echo C('URL_CASE_INSENSITIVE');?>", "<?php echo C('URL_HTML_SUFFIX');?>"],
        "VAR": ["<?php echo C('VAR_MODULE');?>", "<?php echo C('VAR_CONTROLLER');?>", "<?php echo C('VAR_ACTION');?>"],
        'URL_MODEL': "<?php echo C('URL_MODEL');?>",
        'WEIBO_ID': "<?php echo C('SHARE_WEIBO_ID');?>"
    }
    var cookie_config={
        "prefix":"<?php echo C('COOKIE_PREFIX');?>"
    }
    var Config={
        'GET_INFORMATION':<?php echo modC('GET_INFORMATION',1,'Config');?>,
        'GET_INFORMATION_INTERNAL':<?php echo modC('GET_INFORMATION_INTERNAL',10,'Config');?>*1000
    }
    var weibo_comment_order = "<?php echo modC('COMMENT_ORDER',0,'WEIBO');?>";
</script>

<script>
    //全局内容的定义
    var _ROOT_ = "";
    var MID = "<?php echo is_login();?>";
    var MODULE_NAME="<?php echo MODULE_NAME; ?>";
    var ACTION_NAME="<?php echo ACTION_NAME; ?>";
    var CONTROLLER_NAME ="<?php echo CONTROLLER_NAME; ?>";
    var initNum = "<?php echo modC('WEIBO_NUM',140,'WEIBO');?>";
    function adjust_navbar(){
        $('#sub_nav').css('top',$('#nav_bar').height());
        $('#main-container').css('padding-top',$('#nav_bar').height()+$('#sub_nav').height()+20)
    }
</script>

<audio id="music" src="" autoplay="autoplay"></audio>
<?php echo hook('pageHeader');?>
    <script type="text/javascript" src="/Application/Group/Static/js/common.js"></script>
    <link type="text/css" rel="stylesheet" href="/Application/Group/Static/css/group.css"/>
    <script>
        var group_lzl_order = "<?php echo modC('GROUP_LZL_REPLY_ORDER',1,'GROUP');?>";
        var group_lzl_show_count = "<?php echo modC('GROUP_LZL_SHOW_COUNT',5,'GROUP');?>";
    </script>
</head>
<body>
<!-- 头部 -->
<script src="/Public/js/com/com.talker.class.js"></script>
<?php if((is_login()) ): ?><div id="talker">
    </div><?php endif; ?>

<?php D('Common/Member')->need_login(); ?>
<!--[if lt IE 8]>
<div class="alert alert-danger" style="margin-bottom: 0"><?php echo L('_TIP_BROWSER_DEPRECATED_1_');?> <strong><?php echo L('_TIP_BROWSER_DEPRECATED_2_');?></strong><?php echo L('_TIP_BROWSER_DEPRECATED_3_');?> <a target="_blank" href="http://browsehappy.com/"><?php echo L('_TIP_BROWSER_DEPRECATED_4_');?></a><?php echo L('_TIP_BROWSER_DEPRECATED_5_');?></div>
<![endif]-->
<?php $unreadMessage=D('Common/Message')->getHaventReadMeassageAndToasted(is_login()); ?>

<div id="nav_bar" class="nav_bar">
    <div class="container">
        <nav class="" id="nav_bar_container">
            <?php $logo = get_cover(modC('LOGO',0,'Config'),'path'); $logo = $logo?$logo:'/Public/images/logo.png'; ?>
            <a class="navbar-brand logo" href="<?php echo U('Home/Index/index');?>"><img src="<?php echo ($logo); ?>"/></a>
            <div class="" id="nav_bar_main">
                <ul class="nav navbar-nav navbar-left">
                    <?php $__NAV__ = D('Channel')->lists(true);$__NAV__ = list_to_tree($__NAV__, "id", "pid", "_"); if(is_array($__NAV__)): $i = 0; $__LIST__ = $__NAV__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nav): $mod = ($i % 2 );++$i; if(($nav['_']) != ""): ?><li class="dropdown">
                                <a title="<?php echo ($nav["title"]); ?>" class="dropdown-toggle nav_item" data-toggle="dropdown"
                                   href="#"> <?php echo ($nav["title"]); ?> <i class="icon-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <?php if(is_array($nav["_"])): $i = 0; $__LIST__ = $nav["_"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subnav): $mod = ($i % 2 );++$i;?><li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo (get_nav_url($subnav["url"])); ?>" target="<?php if(($subnav["target"]) == "1"): ?>_blank<?php else: ?>_self<?php endif; ?>"><?php echo ($subnav["title"]); ?></a>
                                        </li>
                                        <?php if(($key) == "0"): ?><li class="divider"></li><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                                </ul>
                            </li>
                            <?php else: ?>
                            <li class="<?php if((get_nav_active($nav["url"])) == "1"): ?>active<?php else: endif; ?>">
                                <a title="<?php echo ($nav["title"]); ?>" href="<?php echo (get_nav_url($nav["url"])); ?>"
                                   target="<?php if(($nav["target"]) == "1"): ?>_blank<?php else: ?>_self<?php endif; ?>">
                                    <?php echo ($nav["title"]); ?>
                                    <span class="label label-badge rank-label" title="<?php echo ($nav["band_text"]); ?>"
                                          style="background: <?php echo ($nav["band_color"]); ?> !important;color:white !important;"><?php echo ($nav["band_text"]); ?></span>
                                </a>
                            </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <form class="navbar-form navbar-search navbar-right" role="search">
		            <div class="form-group pull-left">
		              <input type="text" class="form-control" placeholder="搜索话题、树丛或人">
		            </div>
		            <button type="submit" class="btn btn-default pull-left"><i class="iconfont">&#xe622;</i></button>
		        </form>
            </div>
            <!--导航栏菜单项-->
        </nav>
    </div>
</div>
<?php echo hook('setSkin');?>
<div id="tool" class="tool ">
    <?php echo hook('tool');?>
    <?php if(check_auth('Core/Admin/View')): ?><!--  <a href="javascript:;" class="admin-view"></a>--><?php endif; ?>
    <div class="sidebar hidden-xs">
		<ul class="ul1 ">
			<?php if(is_login()): ?><li>
				<a href="<?php echo U('Ucenter/index/index');?>">
					<?php $common_header_user = query_user(array('avatar32')); ?>
					<img class="avatar" src="<?php echo ($common_header_user["avatar32"]); ?>"/>
					<h4>我的树屋</h4>
				</a>
		  	</li>
			<?php else: ?>
			<?php $open_quick_login=modC('OPEN_QUICK_LOGIN', 0, 'USERCONFIG'); $register_type=modC('REGISTER_TYPE','normal','Invite'); $register_type=explode(',',$register_type); $only_open_register=0; if(in_array('invite',$register_type)&&!in_array('normal',$register_type)){ $only_open_register=1; } ?>
            <script>
                var OPEN_QUICK_LOGIN = "<?php echo ($open_quick_login); ?>";
                var ONLY_OPEN_REGISTER = "<?php echo ($only_open_register); ?>";
            </script>
			<li>
				<a data-login="do_login">
					<i class="iconfont">&#xe610;</i>
					<h4>请先登陆</h4>
				</a>
		  	</li><?php endif; ?>
			<li>
				<a href="<?php echo U('Ucenter/Config/index');?>">
					<i class="iconfont">&#xe627;</i>
					<h4>修改资料</h4>
				</a>
		  	</li>
		  	<li>
				<a href="<?php echo U('Ucenter/Index/fans');?>">
					<i class="iconfont">&#xe62e;</i>
					<h4>我的粉丝</h4>
				</a>
		  	</li>
			<li>
				<a href="<?php echo U('Ucenter/Collection/index');?>">
					<i class="iconfont">&#xe619;</i>
					<h4>收藏分享</h4>
				</a>
		  	</li>
		  	<li>
				<a href="<?php echo U('Ucenter/Message/message');?>">
					<i class="iconfont">&#xe633;</i>
					<h4>站内消息</h4>
					<?php if(count($unreadMessage) != 0): ?><span class="badge badge-important" ><?php echo count($unreadMessage);?></span><?php endif; ?>
				</a>
		  	</li>
		  	<?php if(is_login()): if(check_auth('Admin/Index/index')): ?><li>
				<a href="<?php echo U('Admin/Index/index');?>">
					<i class="iconfont">&#xe61e;</i>
					<h4>后台管理</h4>
				</a>
		  	</li><?php endif; ?>
		  	<li>
				<a event-node="logout">
					<i class="iconfont">&#xe623;</i>
					<h4>退出</h4>
				</a>
		  	</li><?php endif; ?>
		</ul>
		
		<ul class="ul2">
			<li>
				<a href="javascript:;">
					<i class="iconfont font28 qr">&#xe640;</i>
					<h4>二维码</h4>
				</a>
				<?php $qrcode = get_cover(modC('QRCODE',0,'Config'),'path'); $qrcode = $qrcode?$qrcode:'/Theme/Want/Public/images/qrcode.png'; ?>
				<div class="showqr">
					<img src="<?php echo ($qrcode); ?>" />
				</div>
		  	</li>
			<li>
				<a id="go-top" href="javascript:;" class="go-top">
					<i class="iconfont">&#xe63d;</i>
					<h4>返回顶部</h4>
				</a>
		  	</li>
		</ul>
	</div>
</div>
<?php if(is_login()&&(get_login_role_audit()==2||get_login_role_audit()==0)){ ?>
<div id="top-role-tip" class="alert alert-danger" style="margin:0;text-align: center;">
    <?php echo L('_TIP_ROLE_NOT_AUDITED1_');?> <strong><?php echo L('_TIP_ROLE_NOT_AUDITED2_');?></strong><?php echo L('_TIP_ROLE_NOT_AUDITED3_');?>
    <a target="_blank" href="<?php echo U('ucenter/config/role');?>"><?php echo L('_TIP_ROLE_NOT_AUDITED4_');?></a>
</div>

<?php } ?>
<?php echo hook('afterTop');?>



<!-- /头部 -->
<div class="main-wrapper">
    <!-- 主体 -->
    <div id="main-container" class="container">

        <?php if(!empty($group)): ?><div class="row">
	<div class="col-md-12">
		<div class="clxq-view">
			<div class="img">
				<?php if($group['logo']){ ?>
				<img src="<?php echo (getthumbimagebyid($group["logo"],130,130)); ?>" alt="<?php echo (op_t($group["title"])); ?>">
				<?php }else{ ?>
				<img src="/Application/Group/Static/images/default.png" alt="<?php echo (op_t($group["title"])); ?>">
				<?php } ?>
				<?php if(check_auth('Group/Manager/*',get_group_admin($group['id']))){ ?>
            	<a class="pull-left abtn" style="background: #48CA93;" href="<?php echo U('Group/Manage/index',array('group_id'=>$group['id']));?>" style="margin-right: 5px"> 管理树丛</a>
            	<?php } ?>
            	<?php if(is_login() != $group['uid']): if(is_joined($group['id']) == 1){ ?>
                <a class="pull-left  abtn" style="background:#666" data-role="group_quit" data-group-id="<?php echo ($group["id"]); ?>">退出树丛</a>
                <?php }elseif(is_joined($group['id']) == 2){ ?>
                <a class="pull-left abtn" style="background: #48CA93;">树丛审核中</a>
                <?php }else{ ?>
                <a class="pull-left abtn" data-role="group_attend" data-group-id="<?php echo ($group["id"]); ?>">加入树丛</a>
                <?php } endif; ?>
            	<span>
					<?php echo (get_type_name($group["type_id"])); ?>
				</span>
			</div>
			<div class="text">
				<h2>树丛名称：<a href="<?php echo U('group/index/group',array('id'=>$group['id']));?>" title="<?php echo ($group["title"]); ?>"><?php echo ($group["title"]); ?></a></h2>
				<ul>
					<li><?php echo Hook('support',array('app'=>'Group',table=>'group','row'=>$group['id'],'uid'=>$group['uid'],'jump'=>'group/index/group'));?>棵树苗参与浇花</li>
					<li><img src="/Theme/Want/Public/images/img28.png"/> <?php echo ($group["view_count"]); ?> 阳光值</li>
				</ul>
				<div class="desc">
					<span class="label1">树丛介绍 ：</span>
					<p><?php echo ($group["detail"]); ?></p>
				</div>
			</div>
			<div class="nav">
				<ul>
					<li>
						<a href="#">
							<h2>视频话题</h2>
							<h4><?php echo ($group["post_count_video"]); ?></h4>
						</a>
					</li>
					<li>
						<a href="#">
							<h2>图文话题</h2>
							<h4><?php echo ($group["post_count_img"]); ?></h4>
						</a>
					</li>
					<li class="last">
						<a href="<?php echo U('group',array('type'=>'member','id'=>$group_id));?>">
							<h2>加入该树丛</h2>
							<h4><?php echo ($group["member_count"]); ?> 个成员</h4>
						</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="clxq-info">
				<div class="info info1">
					<div class="head">
						<h2>树丛公告栏</h2>
					</div>
					<div class="body">
						<?php if($notice != null): echo ($notice["content"]); ?>
    					<?php else: ?>
    						<div class="text-center">暂无公告</div><?php endif; ?>
					</div>
				</div>
				<div class="info info2">
					<div class="head">
						<h2>我的树丛</h2>
					</div>
					<?php if(is_login()): $map_mid=is_login(); $modelMy=D('group_post'); $postcount=$modelMy->where("(uid = ".$map_mid." and status = 1) or (uid = ".$map_mid." and status = 0)")->count(); $replycount=D('group_post_reply')->where("uid= ".$map_mid." and (status=1 or status=0)")->count(); ?>
					<div class="body">
						<ul>
							<li><i><img src="/Theme/Want/Public/images/img37.png"/></i>我参与的话题   <?php echo ($replycount); ?></li>
							<li style="margin-right: 0;"><i><img src="/Theme/Want/Public/images/img38.png"/></i>我发布的话题   <?php echo ($postcount); ?></li>
						</ul>
					</div>
					<?php else: ?>
					<div class="ts">
						<a href="<?php echo U('/Ucenter/Member/login');?>">登录</a>查看你的树丛动态吧！
					</div><?php endif; ?>
				</div>
			</div>
	</div>
</div><?php endif; ?>



        <div class="row">
            
                

	<div class="col-xs-6 margin-bottom-15">
    	<div class="group_tags group_types">
            <b>树丛话题分类：</b>
            <a href="<?php echo U('group',array('id'=>$group_id));?>" <?php if(!$_GET['cate_id']): ?>class="active"<?php endif; ?>>全部</a>
            <a href="<?php echo U('group',array('cate_id'=>1,'id'=>$group_id));?>" <?php if($_GET['cate_id'] == 1): ?>class="active"<?php endif; ?>>视频话题</a>
            <a href="<?php echo U('group',array('cate_id'=>2,'id'=>$group_id));?>" <?php if($_GET['cate_id'] == 2): ?>class="active"<?php endif; ?>>图片话题</a>
        </div>
    </div>
    <div class="col-xs-6">
    	<div class="group_btnwp">
			<h2>世界这么大，想说就说，此时此刻，表个心态呗！</h2>
			<a href="<?php echo U('index/edit',array('group_id'=>$group_id));?>" class="">新建话题</a>
		</div>
    </div>
    <div class="clearfix visible-xs-block"></div>
    <div class="col-xs-12">
    	<?php if($type == 'post'){ ?>
    	<div class="clxq-list">
			<?php if($list): ?><ul>
				<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; echo W('Group/Detail/post',array('post_id'=>$vo)); endforeach; endif; else: echo "" ;endif; ?>
			</ul> 
			<?php else: ?>
			<div style="font-size:16px;font-weight:bold;text-align: center;padding:40px;border: #eee solid 1px;">
				树丛暂无话题！
			</div><?php endif; ?>
		</div>
		<div class="gb-pages pull-right">
			<?php echo getPagination($totalCount,$r);?>
		</div>
		<?php }elseif($type == 'member'){ ?>
		<?php } ?>
    </div>
<script>

    $(function () {
        bindGroupInvite();
    });
    function bindGroupInvite(){
        $('.group_invite').magnificPopup({
            type: 'ajax',
            overflowY: 'scroll',
            modal: true
        });
    }
</script>


        </div>

    </div>
    <script type="text/javascript">
    </script>
    <!-- /主体 -->
    <!-- 底部 -->
    <div class="footer-bar ">
    <div class="container">
        <div class="row">
            <div class="col-xs-3">

                <h3>品牌介绍</h3>
                <ul class="friend-link">
                    <?php echo W('Paper/FootBlock/render',array('catid'=>'1'));?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>玩转顽瞳网</h3>
                <ul class="friend-link">
                    <?php echo W('Paper/FootBlock/render',array('catid'=>'3'));?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>友情链接</h3>
                <ul class="friend-link">
                    <?php echo Hook('friendLink');?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>版权声明</h3>
                <ul class="friend-link">
                    <li><?php echo text(modC('ABOUT_US',L('_NOT_SET_NOW_'),'Config'));?></li>
                    <li style="font-size:12px"><?php echo text(modC('SUBSCRIB_US',L('_NOT_SET_NOW_'),'Config'));?></li>
                    <li style="font-size:12px"><?php echo text(modC('COPY_RIGHT',L('_NOT_SET_NOW_'),'Config'));?> 闽ICP备14009268号</li>
                    
                </ul>
            </div>
        </div>
        <div class="row text-center">
            <img src="/Theme/Want/Public/images/logo3.png"/>
            <?php echo ($count_code); ?>
        </div>
    </div>
</div>

<link type="text/css" rel="stylesheet" href="/Public/static/qtip/jquery.qtip.css"/>
<link type="text/css" rel="stylesheet" href="/Public/js/ext/atwho/atwho.css"/>
<script src="/Public/js.php?t=js&f=js/com/com.notify.class.js,static/qtip/jquery.qtip.js,js/ext/slimscroll/jquery.slimscroll.min.js,js/ext/magnific/jquery.magnific-popup.min.js,js/ext/jcarouse/jcarousellite.js,js/ext/placeholder/placeholder.js,js/ext/atwho/atwho.js,zui/js/zui.js&v=<?php echo ($site["sys_version"]); ?>.js"></script>
<script type="text/javascript" src="/Public/static/jquery.iframe-transport.js"></script>
<script src="/Public/js/ext/lazyload/lazyload.js"></script>
<script type="text/javascript">
	$(document).ready(function (){
		//二维码显示
		$(".ul2 li:first").hover(function(){
		    $(this).find('.showqr').show();
		},function(){
			$(this).find('.showqr').hide();  
		});
	});
</script>




<!-- 页面footer钩子，一般用于加载插件JS文件和JS代码 -->
<?php echo hook('pageFooter', 'widget');?>
<div class="hidden"><!-- 用于加载统计代码等隐藏元素 -->
    
</div>

</div>
<!-- /底部 -->
</body>
</html>